package com.authine.cloudpivot.ext.dto.kingDee.request;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;


@Data
@JsonInclude(value= JsonInclude.Include.NON_NULL)
@Schema(description = "金蝶实例")
public class FEntity {

    /**
     * 摘要信息
     */
    @JsonProperty("FEXPLANATION")
    @Schema(description = "摘要")
    private String fExplanation;

    /**
     * 对应科目
     */
    @JsonProperty("FACCOUNTID")
    @Schema(description = "对应科目")
    private FAccountIdEntity fAccountId;

    /**
     * 币别
     */
    @JsonProperty("FCURRENCYID")
    @Schema(description = "币别")
    private FCurrencyIdEntity fCurrencyId;


    /**
     * 汇率类型
     */
    @JsonProperty("FEXCHANGERATETYPE")
    @Schema(description = "汇率类型")
    private FExchangErateTypeEntity fExchangerateType;

    /**
     * 汇率
     */
    @JsonProperty("FEXCHANGERATE")
    @Schema(description = "汇率")
    private BigDecimal fExchangerate;

    /**
     * 不含税金额汇总--借方金额
     */
    @JsonProperty("FDEBIT")
    @Schema(description = "不含税金额汇总--借方金额")
    private BigDecimal fDebit;

    /**
     * 供应商 核算维度内码
     */
    @JsonProperty("FDetailID")
    @Schema(description = "供应商 核算维度内码")
    private FDetailIdEntity fDetailIdEntity;

    /**
     * 不含税金额汇总--贷方金额
     */
    @JsonProperty("FCREDIT")
    @Schema(description = "不含税金额汇总--贷方金额")
    private BigDecimal fCredit;

    /**
     * 新增字段9
     */
    @JsonProperty("FAMOUNTFOR")
    @Schema(description = "总金额")
    private Integer fAmountFor;

    public static FEntity addFentity() {
        FEntity f = new FEntity();
        f.setFCurrencyId(FCurrencyIdEntity.addfcurrencyid());
        f.setFExchangerateType(FExchangErateTypeEntity.addFEXCHANGERATETYPE());
        f.setFExchangerate(BigDecimal.ONE);
//        f.setFAmountFor(11);
        return f;
    }
}
